package com.ruoyi.project.repairs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.repairs.mapper.LblCsMaintainInfoMapper;
import com.ruoyi.project.repairs.domain.LblCsMaintainInfo;
import com.ruoyi.project.repairs.service.ILblCsMaintainInfoService;

/**
 * 维修信息Service业务层处理
 * 
 * @author BaoL
 * @date 2023-03-25
 */
@Service
public class LblCsMaintainInfoServiceImpl implements ILblCsMaintainInfoService 
{
    @Autowired
    private LblCsMaintainInfoMapper lblCsMaintainInfoMapper;

    /**
     * 查询维修信息
     * 
     * @param id 维修信息ID
     * @return 维修信息
     */
    @Override
    public LblCsMaintainInfo selectLblCsMaintainInfoById(Long id)
    {
        return lblCsMaintainInfoMapper.selectLblCsMaintainInfoById(id);
    }

    /**
     * 查询维修信息列表
     * 
     * @param lblCsMaintainInfo 维修信息
     * @return 维修信息
     */
    @Override
    public List<LblCsMaintainInfo> selectLblCsMaintainInfoList(LblCsMaintainInfo lblCsMaintainInfo)
    {
        return lblCsMaintainInfoMapper.selectLblCsMaintainInfoList(lblCsMaintainInfo);
    }

    /**
     * 新增维修信息
     * 
     * @param lblCsMaintainInfo 维修信息
     * @return 结果
     */
    @Override
    public int insertLblCsMaintainInfo(LblCsMaintainInfo lblCsMaintainInfo)
    {
        lblCsMaintainInfo.setCreateTime(DateUtils.getNowDate());
        return lblCsMaintainInfoMapper.insertLblCsMaintainInfo(lblCsMaintainInfo);
    }

    /**
     * 修改维修信息
     * 
     * @param lblCsMaintainInfo 维修信息
     * @return 结果
     */
    @Override
    public int updateLblCsMaintainInfo(LblCsMaintainInfo lblCsMaintainInfo)
    {
        lblCsMaintainInfo.setUpdateTime(DateUtils.getNowDate());
        return lblCsMaintainInfoMapper.updateLblCsMaintainInfo(lblCsMaintainInfo);
    }

    /**
     * 批量删除维修信息
     * 
     * @param ids 需要删除的维修信息ID
     * @return 结果
     */
    @Override
    public int deleteLblCsMaintainInfoByIds(Long[] ids)
    {
        return lblCsMaintainInfoMapper.deleteLblCsMaintainInfoByIds(ids);
    }

    /**
     * 删除维修信息信息
     * 
     * @param id 维修信息ID
     * @return 结果
     */
    @Override
    public int deleteLblCsMaintainInfoById(Long id)
    {
        return lblCsMaintainInfoMapper.deleteLblCsMaintainInfoById(id);
    }
}
